package com.example.course.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 评论表
 * @Date 2025-04-22 15:36:52
 * @author Jasmine-drs
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("comment")
@ApiModel(value="Comment对象", description="评论表")
public class Comment implements Serializable {

    @NotNull(message="[主键]不能为空")
    @ApiModelProperty("主键")
    private Integer id;

    @NotNull(message="[评论的学生id]不能为空")
    @ApiModelProperty("评论的学生id")
    private Integer studentId;

    @NotNull(message="[课程id]不能为空")
    @ApiModelProperty("课程id")
    private Integer courseId;

    @ApiModelProperty("评论的内容")
    private String content;

    @NotNull(message="[发表时间]不能为空")
    @ApiModelProperty("发表时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
